#!/bin/sh
if [ -z "$CONFIG_URL" ]
then
    echo 'url not set,skip download config'
else
    echo 'download url is '$CONFIG_URL
    set -ex && wget -qO /opt/agent/conf.ini $CONFIG_URL
    echo 'finish download'
fi
echo 'start application'
/opt/agent/agent